package com.highspeed.bdk.controller.logic;

import com.highspeed.bdk.bean.entity.logic.App;
import com.highspeed.bdk.bean.entity.logic.LogicLink;
import com.highspeed.bdk.bean.entity.logic.LogicTopology;
import com.highspeed.bdk.service.logic.IAppService;
import com.highspeed.bdk.service.logic.ILogicLinkService;
import com.highspeed.bdk.service.logic.ILogicTopologyService;
import org.springframework.beans.factory.annotation.Autowired;

public abstract class BaseAppServiceTester {

    @Autowired
    protected ILogicLinkService logicLinkService;
    @Autowired
    protected ILogicTopologyService logicTopologyService;
    @Autowired
    protected IAppService appService;

    protected LogicLink createLogicLink(App app1, App app2) {
        LogicLink link = new LogicLink();
        link.setName("link id");
        link.setLeftApp(app1);
        link.setRightApp(app2);

        //link.setCreator("creator");
        return link;
    }

    protected App createApp() {
        App app = new App();
        app.setName("name");
        // app.setCreator("creator");
        return app;
    }

    protected LogicTopology createLogicTopology() {
        LogicTopology logicTopology = new LogicTopology();
        logicTopology.setName("MachineBoxName");
        logicTopology.setCreator("setCreator");
        logicTopology.setNo("no");
        return logicTopology;
    }
}
